#include<iostream>
#include<cstdio>
using namespace std;
void Show_Erjinzhi(int n)
{
	int i = 0;
	int arr[1010];
	while (n) {
		arr[i++] = n % 2;
		n /= 2;
	}
	if (i < 32) {
		for (int j = 0; j < 32 - i; j++) {
			cout << "0";
		}
	}
	for (int j = i - 1; j >= 0; j--) {
		cout << arr[j];
	}
}
int main()
{
	int n;
	cin >> n;
	int t = n;
	Show_Erjinzhi(n);
	cout << endl;
	int count = 0;
	while (n) {
		count++;
		n = (n) & (n - 1);
	}
	cout << count << endl;
	return 0;
}